package com.ruoyi.pcj.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsJoinSubTable;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.pcj.constant.TbConstant;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 贴吧-文章对象 pcj_tb_comment
 *
 * @author dk
 * @date 2024-03-12
 */
@Data
@TableName(TbConstant.pcjTbComment)
public class PcjTbComment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableId
    @TableField("id")
    // @MsJoinSubTable(joinTable = TbConstant.pcjTbCommentReply, joinField = "comment_id", clazz = PcjTbCommentReply.class, setField = "pcjTbCommentReplyList", condition = " del_flag = 0 ")
    private String id;

    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;

    /**
     * 评论人id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 文章id
     */
    @TableField("article_id")
    private String articleId;

    /**
     * 评论内容
     */
    @TableField("content")
    private String content;

    @TableField(exist = false)
    private List<String> fileUrls;

    @TableField(exist = false)
    private List<PcjTbCommentReply> pcjTbCommentReplyList;

}
